﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>@ViewBag.Title - My ASP.NET Application</title>

    @Styles.Render("~/Content/css")
</head>
<body>
    <div class="navbar navbar-inverse navbar-fixed-top">
        <div class="container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                @Html.ActionLink("Application name", "Index", "Home", new { area = "" }, new { @class = "navbar-brand" })
            </div>
            <div class="navbar-collapse collapse">
                <ul class="nav navbar-nav">
                    <li>@Html.ActionLink("Home", "Index", "Home")</li>
                    <li>@Html.ActionLink("About", "About", "Home")</li>
                    <li>@Html.ActionLink("Contact", "Contact", "Home")</li>
                </ul>
                @*@Html.Partial("_LoginPartial")*@
            </div>
        </div>
    </div>

    <div id="messageAlert">
        @*@Html.Partial(@Url.Content("~/Views/Module/_Alert.cshtml"), new App.Clinic.Models.Module.AlertModel { AlertType = global::App.Clinic.Models.Module.AlertType.Success, Message = "aaaaaaaa" })*@
    </div>

    <div class="container body-content">
        
        @if (ViewBag.Error != null)
        {
            <div class="alert alert-danger">
                @ViewBag.Error
            </div>
        }
        @if (ViewBag.Warning != null)
        {
            <div class="alert alert-warning">
                @ViewBag.Warning
            </div>
        }
        @if (ViewBag.Info != null)
        {
            <div class="alert alert-info">
                <button type="button" class="close" data-dismiss="alert">&times;</button>
                @ViewBag.Info
            </div>
        }
        @if (ViewBag.Success != null)
        { 
            <div class="alert alert-success">
                @ViewBag.Success
            </div>
        }


        @RenderBody()
        <hr />
        <footer>
            <p>&copy; @DateTime.Now.Year - My ASP.NET Application</p>
        </footer>
    </div>

    @Scripts.Render("~/bundles/jquery")
    @Scripts.Render("~/bundles/jqueryui")
    @Scripts.Render("~/bundles/bootstrap")
    @Scripts.Render("~/bundles/knockout")
    @Scripts.Render("~/bundles/Components")

    <script>
        function postData(path, form) {
            var request = $.ajax({
                type: "post",
                url: path,
                cache: false,
                data: form
            })

            request.success(function (data, textStatus, jqXHR) {
                $("#messageAlert").html(data);
            });

        }
    </script>
    @RenderSection("scripts", required: false)

</body>
</html>
